package com.cloud.dao;

import com.cloud.entity.Message;
import com.cloud.entity.User;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

import java.util.List;

public interface MessageDao extends JpaRepository<Message, Integer>, JpaSpecificationExecutor<Message> {

    @Query(value =  "select * from message where m_status =?1 and receive_id = ?2 ",nativeQuery = true)
    List<Message> findByMStatusAndReceiveId(Integer mStatus, Integer receiveId);


}

